﻿@model Bibilioteca.Models.Ejemplar

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Ejemplar</legend>
        <br /><b>@ViewBag.TituloMaterial</b> de @ViewBag.Autores <br /><br />
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.SelectedMaterial)

        <div class="editor-label">
            @Html.LabelFor(model => model.Estado)
        </div>
        <div class="editor-field">
                @Html.DropDownListFor(model => model.Estado, new SelectList(ViewBag.Estados, "Value", "Text", Model.Estado))
                @Html.ValidationMessageFor(model => model.Estado)
            </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver al material", "Details", "Materiales", new { id = Model.SelectedMaterial }, null)
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
